﻿// Shader-Based-Image-Processing (SBIP)
// http://code.google.com/p/sbip/
//
// Copyright © Frank Nagl, 2009-2011
// admin@franknagl.de
//
namespace SBIP.OptionsForms
{
    using System;
    using System.Windows.Forms;
    using Filter;

    /// <summary>Filter specified properties form.</summary>
    public partial class WhiteContentForm : Form
    {
        private readonly WhiteContent filter;

        /// <summary>
        /// Initializes a new instance of the <see cref="SobelForm"/> class.
        /// </summary>
        /// <param name="processor">The processor.</param>
        public WhiteContentForm(Processor processor)
        {
            InitializeComponent();
            filter = new WhiteContent();
            processor.Filter = filter;
        }

        private void TrbarValueChanged(object sender, EventArgs e)
        {
            filter.NonWhiteContentGrayColor = (byte)trbarValue.Value;
            lbValue.Text = trbarValue.Value.ToString();
        }

        private void RdbtnNormalCheckedChanged(object sender, EventArgs e)
        {
            filter.Inverted = !((RadioButton) sender).Checked;
        }
    }
}
